Why the effort?
offsetGridText- Data preparation
- Specifying
posmanually - Automated label positioning via
thigmophobe - Shadow text functionality via
grid.stext
Summary
April 22, 2015
Why the effort?
offsetGridText
pos manuallythigmophobegrid.stextSummary
text
adjpos and offset (overrides adj)grid.text
justhjust and vjust (overrides just)text
grid.text
pos (1 = bottom, 2 = left, 3 = top, 4 = right) andoffsetthigmophobeoffsetGridText code snippetsoffsetGridText offsetGridText offsetGridText # # install 'Rsenal' package
# library(devtools, quietly = TRUE)
# install_github("environmentalinformatics-marburg/Rsenal")
# load package
library(Rsenal)
# spatial data
load("data/osm_kili.RData")
# print trellis object
print(p)
offsetGridText pos manually# enter viewport
downViewport(trellis.vpname(name = "figure"))
# labels
ch_lbl <- shp_kili_sls$PlotID
# insert text
offsetGridText(x = coordinates(shp_kili_sls),
labels = ch_lbl,
xlim = num_xlim, ylim = num_ylim,
pos = rep(1, length(ch_lbl)), offset = .0225,
gp = gpar(fontsize = 20))
offsetGridText pos manuallyoffsetGridText thigmophobe# insert text
offsetGridText(x = coordinates(shp_kili_sls),
labels = ch_lbl,
xlim = num_xlim, ylim = num_ylim,
offset = .0225,
gp = gpar(fontsize = 20))
offsetGridText thigmophobeoffsetGridText grid.stext# insert text
offsetGridText(x = coordinates(shp_kili_sls),
labels = ch_lbl, stext = TRUE,
xlim = num_xlim, ylim = num_ylim,
offset = .0225,
gp = gpar(fontsize = 20))
offsetGridText grid.stextoffsetGridText
text and grid.text positioning argumentsthigmophobeThis ioslides presentation was entirely created from R Markdown v2.
For further information, check out
http://blog.rstudio.org/2014/06/18/r-markdown-v2/.